"""
添加客户页面类
"""
from ..base_page import BasePage
from selenium.webdriver.common.by import By


class AddCustomerPage(BasePage):
    #数据
    url="/crm/index.php?m=customer&a=add"
    #定位器
    khmc_locator = (By.CSS_SELECTOR, "#name")
    save_locator = (By.CSS_SELECTOR, "#form1 > table > tfoot > tr > td > input:nth-child(1)")
    frkhc_locator = (By.ID, "remove")
    zip_code_locator = (By.ID, "zip_code")
    #方法
    def customer_mc(self,name):  #进入到站内信页面
        self.send_keys(self.khmc_locator,name)
    def customer_save(self):
        self.click(self.save_locator)
    def customer_khc(self):
        self.click(self.frkhc_locator)
    def zip_code(self,code):
        self.send_keys(self.zip_code_locator,code)